<?php
/**
 * @author FeoniX
 * @version v1.0
 */
require_once(EASY_PATH . 'Lib/Smarty/Smarty.class.php');
class View {
	private $smarty;

	public function __construct(){
		$this->smarty = new Smarty();

		$this->smarty->left_delimiter = '{{'; //左定界符
		$this->smarty->right_delimiter = '}}'; //右定界符
		$this->smarty->template_dir = APP_PATH.'View'; //html模板文件路径
		$this->smarty->compile_dir = APP_PATH.'Runtime/Temp'; //模板编译生成的文件的存放路径
		$this->smarty->cache_dir = APP_PATH.'Runtime/Cache'; //缓存文件存放路径

		// $this->smarty->caching = true; //开启缓存
		// $this->smarty->cache_lifetime = 120; //缓存有效时间

	}
	public function display($tpl){
		$this->smarty->display($tpl);
	}
	public function assign($var, $val){
		$this->smarty->assign($var, $val);
	}
}

?>